//可变变量
public class Variable{
	//编写一个main的主方法
	public static void main(String[] args){

		T t1 = new T();
		String name = "张三";
		double  score[] = {10,12,45,90};
		String rst = t1.showScore(name, score);
		System.out.println(rst);

		String rst1 = t1.showScore("Lucy", 85.6,99,86.5,94,88);
		System.out.println(rst1);

	}
}



class T{
	public String showScore(String name, double... scores){
		double totalScore = 0;
		for(int i = 0; i < scores.length; i++){
			totalScore += scores[i];
		}

		return name+" 有 "+scores.length+" 门课的成绩总分为= "+ totalScore;
	}
}